package com.aacar.dao.impl;

import org.springframework.stereotype.Repository;

import com.aacar.dao.MemberDao;
import com.aacar.dao.base.CommonBaseDao;
import com.aacar.entity.Member;
import com.aacar.vo.UserInfoVo;
import com.aacar.vo.UserVo;

@Repository("memberDao")
public class MemberDaoImpl extends CommonBaseDao<Member, String> implements MemberDao {

	private static final String nameSpace = "com.aacar.dao.MemberDao.";

	@Override
	public UserVo getMember(Member member) {
	    return this.getSqlSession().selectOne(nameSpace.concat("getMember"), member);
	}

	@Override
	public int saveMember(Member member) {
		return saveObject(nameSpace.concat("save"), member);
	}

	@Override
	public int updateMember(Member member) {
		return updateObject(nameSpace.concat("updateMember"), member);
	}
	
	
	public int getCountByPhoneNo(Member member) {
		return this.getSqlSession().selectOne(nameSpace.concat("getCountByPhoneNo"), member);
	}
	
	//获取个人信息
	public UserInfoVo getUserInfo(Member member) {
		return this.getSqlSession().selectOne(nameSpace.concat("getUserInfo"), member);
	}

	
}
